<?php
$this->Html->css('controllers/Certifications/index.css?1', array('block' => 'stylesTop'));
$this->Html->script('controllers/Certifications/index.js?1', array('block' => 'scriptBottom'));
$appBosch->crud = $this->TioCachas->urlsCRUD();
$appBosch->urlDetails = $this->Html->url(array('action'=>'getDetails'));
$appBosch->iCertifications = 1;
$appBosch->urlCertificate = $this->Html->url(array('action'=>'certificate'));
?>
<script id="templateProximos" type="text/kendo-template">
    #if(proximos == 1 ){#
        <i class='fa fa-clock-o proximo' style="color:red; font-size:3rem; display:block; text-align:center;" title='<?php echo __('certificación en proceso próxima a caducar');?>'</i>
    #}#
</script>

<script id="templateDetalles" type="text/kendo-template">
    <table class="table table-bordered table-condensed">
        <thead>
        <tr>
            <th><?php echo __('Tema');?></th>
            <th><?php echo __('Calificación');?></th>
            <th><?php echo __('Fecha');?></th>
        </tr>
        </thead>
        <tbody>
            # for (i = 0; i < data.length; i++) { #
                <tr>
                    <td>#= data[i].workstation_config_name #</td>
                    <td>#= data[i].certification_detail_qualification #</td>
                    <td title="#=kendo.toString(new Date(data[i].certification_detail_date.replace(/-/g, '/')), 'D')#">
                        #=kendo.toString(new Date(data[i].certification_detail_date.replace(/-/g, "/")), "d")#
                    </td>
                </tr>
            # } #
        </tbody>
    </table>
</script>

<div id="messageCert" class="alert alert-warning hidden"><?php echo __('No se encontraron certificaciones'); ?></div>
<div id="grid"></div>


<a id="magicLink" class="hidden"></a>

<?php $this->start('jsVars'); ?>
<script type="text/javascript">
    var appBosch = <?php echo json_encode($appBosch); ?>;
</script>
<?php $this->end();